using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System.Diagnostics;

namespace amazingfishing.sprites
{
    public class Fish:Sprite
    {

        protected Vector2 fishPoint;
        protected Random ran;

        public Fish(Texture2D _img, Vector2 _position, Point _frameSize, Point _sheetSize, int _timeperFrame)
            : base(_img, _position, _frameSize,_sheetSize,_timeperFrame)
        {
            fishPoint = new Vector2(0, 0);
            ran = new Random();
        }

        public Vector2 FishPoint
        {
            get
            {
                return (position + fishPoint);
            }
            set
            {
                fishPoint = value;
            }
        }

        public virtual void Update(GameTime gameTime, Vector2 waterSpeed, Vector2 dragSpeed)
        {
            speed =randomSpeed() + waterSpeed + dragSpeed;
            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            base.Draw(gameTime, spriteBatch);
        }

        protected virtual Vector2 randomSpeed()
        {
            Vector2 ranSpeed;
            int x = ran.Next(-10, 11);
            int y = ran.Next(-10, 0);
            ranSpeed = new Vector2(x, y);
            return ranSpeed;
        }
    }
}
